Recent searches

in

order

On this page

This key defines which order an option in the Sort dropdown should use to sort files in your Collection browser.

CloudCannon will sort files according to the value of sort_options[*].key for each option in the Sort dropdown.

Appears in#

└── collections_config
    └── *
        └── sort_options
            └── [*]
                └── order

Type#

string

Default value#

ascending

Allowed values#

ascending
descending
asc
desc

Examples#

In this example, the "Author (A-Z)" option in the Sort dropdown will sort files in the blog Collection browser in ascending order.

Copied to clipboard
collections_config:
  blog:
    sort_options:
      - key: author
        order: ascending
        label: Author (A-Z)
{
  "collections_config": {
    "blog": {
      "sort_options": [
        {
          "key": "author",
          "order": "ascending",
          "label": "Author (A-Z)"
        }
      ]
    }
  }
}
Open in a new tab